<!-- thanh toolbar -->
<?php $act = (string)$this->inbound_log_type == '1' ? 'insert-out' : 'insert-in' ;?>
<?php $this->placeholder('toolbar')->captureStart();?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/new.phtml', 'admin', array($this->url(array('action' => $act)))) ?>
<?php $this->placeholder('toolbar')->captureEnd();?>
<!-- / -->

<script type="text/javascript">
var companies = <?php echo Zend_Json::encode($this->key_companies);?>;
$(document).ready(function(){
	$( "#inbound_log_company_code" ).blur(function(){
		if( companies[$(this).val()] == null ){
			$(this).val('');
		}
	});	
	$( "#inbound_log_create_time_a" ).datepicker({
		create : function (){
			
		},
		'onSelect' : function(){
				
		}
	});
});
</script>

<!-- thanh toolbar -->
<?php $act = (string)$this->inbound_log_type == '1' ? 'insert-out' : 'insert-in' ;?>
<?php $this->placeholder('toolbar')->captureStart();?>
<?php echo $this->partial('index/toolbar/excel.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/excel-all.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/new.phtml', 'admin', array($this->url(array('action' => $act)))) ?>
<?php //echo $this->partial('index/toolbar/edit.phtml', 'admin', array($this->url(array('action' => 'update')))) ?>
<?php //echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php //echo $this->partial('index/toolbar/trash.phtml', 'admin', array($this->url(array('action' => 'delete')))) ?>
<?php $this->placeholder('toolbar')->captureEnd();?>
<!-- / -->

<!-- submenu -->
<?php $this->submenu=array(//class="active"
"Danh sách phiếu {$this->string_inbound_log_type} kho"=>$this->url(array("report_type"=>0)),
"Tra cứu thông tin {$this->string_inbound_log_type} kho"=>$this->url(array("report_type"=>1)),
"Báo cáo {$this->string_inbound_log_type} kho"=>$this->url(array("report_type"=>2)),
);?>
<!-- / -->


<table class='adminlist'>
	<thead>
		<tr> 
			<?php echo $this->partial('index/manage/save-order.phtml', 'admin', array($this->url(array('action'=>'save-order')))); ?>					
			<th width='80px'> <?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'inbound_log_create_time')); ?> </th>
			<th width='100px'> <?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'inbound_log_create_user')); ?> </th>
			<th> <?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'inbound_log_note')); ?> </th>
			<th width='80px'> Quản lý </th>
		</tr>
	</thead>
	<tbody>
		<?php if (count($this->paginator) > 0): $no=0;?>
		<?php foreach ($this->paginator as $row): ?>
		<tr class='row<?php echo ($no++)%2 ?>'> 
			<?php echo $this->partial('index/manage/order.phtml', 'admin', array($no)) ?>			
			<td class='center'><?php echo $this->partial('index/format/time.phtml','admin',array($row->inbound_log_create_time)); ?></td>
			<td class='left'><?php echo $row->inbound_log_create_user; ?></td>
			<td class='left'><?php echo $row->inbound_log_note; ?></td>
			<td class='center'>
				<?php echo $this->partial('index/manage/detail.phtml','admin', array($this->url(array('module'=>'inbound','controller'=>'index','action' => 'detail',),null,true))); ?>
			</td>
		</tr>
		<?php endforeach; ?>
		<?php endif;?>
	</tbody>
		<tfoot>
		<tr>
			<td colspan='16'>
				<div class='container'>
					<?php echo $this->paginationControl($this->paginator) ?>
				</div>
			</td>
		</tr>
	</tfoot>
</table>
